<?php 
require_once 'config.php';
if(!$loggedIn){
	header('Location:login.php') ;
	exit();
}
$img = mysql_escape_string($_POST['image']);

mysql_query("UPDATE te_theme SET desktop_bg='$img' WHERE theme_id=$themeId");
echo mysql_error();
?>